// 面试相关的接口函数
import request from '@/utils/http.js'

//1.添加面试
export const addInterviewAPI=(data) =>{
    return request({
        url: '/interview/addInterview',
        method: 'post',
        data:{
            interviewUrl:data.interviewUrl,
            interviewDesc:data.interviewDesc,
            interviewData:data.interviewData,
            interviewJobId:data.interviewJobId,
            interviewStudentId:data.interviewStudentId,
            interviewEnterpriseId:data.interviewEnterpriseId,
        }
    })
}

//2.获取面试列表
export const pageInterviewAPI=(data) =>{
    return request({
        url: '/interview/pageInterview',
        method: 'post',
        data:{
            interviewStudentId:data.interviewStudentId,
            interviewJobId:data.interviewJobId,
            interviewEnterpriseId:data.interviewEnterpriseId,
            interviewStatus:data.interviewStatus,
        }
    })
}
//3.企业-分页获取面试消息
export const pageInterviewByEnterpriseIdAPI=(data) =>{
    return request({
        url: '/interview/pageInterviewByEnterprise',
        method: 'post',
        data:{
            interviewStudentId:data.interviewStudentId,
            interviewJobId:data.interviewJobId,
            interviewEnterpriseId:data.interviewEnterpriseId,
            interviewStatus:data.interviewStatus,
        }
    })
}
//4.查询面试详情
export const queryInterviewByIdAPI=(interviewId)=> {
    return request({
        url: '/interview/queryInterviewById',
        method: 'post',
        params: {
            interviewId:interviewId,
        }
    })
}

//5.修改面试状态
export const updateInterviewIsOfferAPI=(interviewId,interviewIsOffer)=> {
    return request({
        url: '/interview/updateInterviewIsOffer',
        method: 'post',
        params: {
            interviewId:interviewId,
            interviewIsOffer:interviewIsOffer,
        }
    })
}

//6.查询学生面试数量ByStudentId
export const queryInterviewCountAPI=(studentId)=> {
    return request({
        url: '/interview/queryInterviewCount',
        method: 'post',
        params: {
            studentId:studentId,
        }
    })
}
//7.企业删除面试记录
export const deleteInterviewByEnterpriseAPI=(interviewId,interviewEnterpriseId)=> {
    return request({
        url: '/interview/deleteInterviewByEnterprise',
        method: 'post',
        params: {
            interviewId:interviewId,
            interviewEnterpriseId:interviewEnterpriseId,
        }
    })
}